//
//  AppDelegate+Server.m
//  haoshuimian365
//
//  Created by apple on 2017/6/19.
//  Copyright © 2017年 CYY. All rights reserved.
//

#import "AppDelegate+Server.h"
//#import "BaiduMobStat.h"

@interface AppDelegate ()//<WXApiDelegate>

@end

@implementation AppDelegate (Server)
/**  注册bugly */
-(void)registBugly{
    //bugly
//    [Bugly startWithAppId:BuglyKey];

}

/**  注册shareSDK */
-(void)registShareSDK{
//    [ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) {
//        [platformsRegister setupWeChatWithAppId:@"wxf6ec0dc531a7b5e9" appSecret:@"84b0e54d88f461fa929582f8a6906eda" universalLink:UniversalLink];
//        [platformsRegister setupQQWithAppId:@"1105110441" appkey:@"5p49Ft0s9m3v6kBy" enableUniversalLink:NO universalLink:UniversalLink];
//    }];
}

/**  注册微信支付 */
-(void)registWeiPay{
//    [WXApi registerApp:WXPayKey universalLink:UniversalLink];
}

/**  创建数据库 */
-(void)creatDateBase{
//    [[DataBaseManager shareInstance] openDB];
//    [[DataBaseManager shareInstance] creatSleepDiaryTestTable];//睡眠日记题库
//    [[DataBaseManager shareInstance] creatSystemNewsTableWithUserid:kUserId];//系统通知消息表
//    [[DataBaseManager shareInstance] creatMyNewsTableWithUserid:kUserId];//评论消息表
//    [[DataBaseManager shareInstance] createWSKXTableWithUserid:kUserId];//威斯康辛
}



#pragma mark---微信回调结果

//-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{
//    return  [WXApi handleOpenURL:url delegate:self];
//}
//
//
//-(BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler{
//    return [WXApi handleOpenUniversalLink:userActivity delegate:self];
//}
//
//- (void)onResp:(BaseResp *)resp{
//    NSLog(@">>???>>>%@-%d",resp.errStr,resp.errCode);
//    if ([resp isKindOfClass:[SendAuthResp class]]) {
//        SendAuthResp *response = (SendAuthResp *)resp;
//        if (response.errCode == 0) {
//            //用户确认授权
//            [[NSNotificationCenter defaultCenter] postNotificationName:@"WeChatAuthorizationSuccess" object:response];
//        }else{
//            //用户取消授权
//            [[NSNotificationCenter defaultCenter] postNotificationName:@"WeChatAuthorizationFaild" object:response];
//        }
//    }
//}


@end
